package com.ping.controller;

import java.util.LinkedList;
import java.util.List;

import com.jfinal.plugin.activerecord.Record;
import com.ping.model.Store;
import com.ping.service.BaseService;

public class StoreController extends BaseController{
	
	public void stores(){
		if (!checkQuery()) {
			return ;
		}
		
		String query = getPara(QUERY_STATEMENT);
		String[] params = {Store.MARKET};
		
		BaseService service = new BaseService() {
		};
		
		List<Record> records = service.find(query, Store.SQL_GET_STORES_IN_MARKET, params);
		
		if (records == null) {
			renderOperateError();
		}else {
			renderResult(records, true);
		}
	}
}
